package com.lagou.product.serviceimpl;

import com.lagou.common.mapper.ProductMapper;
import com.lagou.common.pojo.Product;
import com.lagou.common.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @BelongProject: task9-2
 * @author: 胡恺恺
 * @createTime: 2021/2/5  12:07
 * @Description:
 */
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    ProductMapper productMapper;

    @Override
    public int insertProduct(Product product) {

        return productMapper.insert(product);
    }

    @Override
    public Product queryById(Integer id) {
        return productMapper.selectById(id);
    }
}
